home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / bbs / qb281cz2.zip / STRUCTUR.DOC < prev    next >
Text File  |  1996-07-16  |  16KB  |  377 lines

  1. QuickBBS Version 2.81 PROTOTYPE Structures Document
  2. ===================================================
  3.  
  4. ** This is a work in progress ** 
  5.         Any Assistance is welcomed!
  6.  
  7.         - I would like to see Example files, as well as additional
  8.           *COMMENTS* in the STRUCTUR.DOC, as well as the specific
  9.           language files.
  10.  
  11. This file contains all of the data file structures used by the QuickBBS
  12. Version 2 series.  These are provided as a reference for utility writers
  13. to develop and test their programs for use with QuickBBS.
  14.  
  15. All "String[]" type variables are one byte bigger than specified, byte 0
  16. (the first byte) contains the length of the string.  The remaining of
  17. the string should be ignored, as it is not padded with nulls.
  18.  
  19.    Turbo Pascal Variable Type     C Language Var Type       Length
  20.    ===============================================================
  21.    Byte                        |  Char                   |  1 byte
  22.    Char                        |  Char                   |  1 byte
  23.    Integer                     |  Int                    |  2 bytes
  24.    Word                        |  Unsigned Int           |  2 bytes
  25.    LongInt                     |  Long                   |  4 bytes
  26.    Real                        |  [ None ]               |  6 bytes
  27.    ===============================================================
  28.  
  29. PowerBasic Notes:                       (From James GoldBloom)
  30.  
  31. So, if you see:  variable as string[40]
  32.  
  33. In BASIC, at least, this would translate as:
  34.  
  35. TYPE Test
  36.   variableLEN as string * 1    'add this in to account for pascal's method
  37.   variable    as string * 40   'max length of variable, null padded
  38. END TYPE
  39.  
  40. I created a matching variable which stores the length, so that later on
  41. in the program I can easily create the correct string length without padded
  42. nulls, which is a nifty step saved later.  I use a function to do this,
  43. so no routines are called, and runs fast as lightning.
  44.  
  45. So, to convert after reading in that data to your buffer:
  46.  
  47. FUNCTION convertstr$(a$,b$)
  48. convertstr$=left$(a$,asc(b$))
  49. END FUNCTION
  50.  
  51. IN the function above, a$ would be "test.variable", and b$ would
  52. be "test.variableLEN", passed to the function as:
  53.  
  54. convertstr$(test.variable,test.variableLEN)
  55.  
  56. Note, you could just as easily read in the same data as "var as string * 41"
  57. and later parse the string, so to each his own.  You get the idea though.
  58.  
  59. ==========================================================================
  60. Location of Data Files:
  61.  
  62. Note: These are the Recommended Locations, and not necessarily the
  63.       ONLY location that the files can be stored at.
  64.  
  65. EXECUTABLES     Must be on the path or be the current directory.
  66. {opt}   266TO276.EXE
  67. {opt}   275TO276.EXE
  68. {opt}   276TO266.EXE
  69. {opt}   ALIASFIX.EXE
  70. {opt}   LIMTO280.EXE
  71.         MAILSCAN.EXE
  72.         MAILTOSS.EXE
  73.         MENUEDIT.CFG
  74.         MENUEDIT.DAT
  75.         MENUEDIT.EXE
  76. {opt}   MIXER.COM
  77.         MSGPACK.EXE
  78. {opt}   OS2MIXER.EXE
  79.         QCONFIG.EXE
  80.         QCONFIG.OVR
  81.         QECHO.EXE
  82.         QLINK.EXE
  83.         QNODE.EXE
  84.         QUICKBBS.EXE
  85. {opt}   RA2QUICK.EXE
  86.         USEREDIT.EXE
  87.         USERPACK.EXE
  88. {opt}   USRTO280.EXE
  89.  
  90. SYSTEM          Pointed to by the QUICK environment variable. Contains
  91.                 *default* configuration files, tosser files.
  92.         *.ASW           questionaire answer files
  93.         AREAS.BBS       echomail areas file for tosser
  94.         ECHOMAIL.BBS    pointers to unscanned echomail
  95.         ERRORS.LOG      error log
  96.         EVENTCFG.DAT    BBS event configuration file
  97.         FILECFG.DAT     BBS file area configuration file
  98.         LANGUAGE.DAT    BBS language configuration file
  99.         LIMITS.DAT      BBS user limits file (security level
  100.                         definitions)
  101.         MSGCFG.DAT      BBS message area configuration file
  102.         NETMAIL.BBS     pointers to unscanned netmail
  103.         PHONE#.CTL      BBS callback verifier phone number translation
  104.                         & cost file
  105.         PHONENUM.CTL    BBS phone number "filter" file
  106.         PROTOCOL.DAT    BBS transfer protocol configuration file
  107.         QECHO.CTL       tosser config file
  108.         QECHO.PWD       tosser packet password file (note: at this time
  109.                         this file is *ignored* unless it is in the
  110.                         *current* directory when QECHO is run!
  111.         QUICKCFG.DAT    BBS configuration file
  112.         SYSINFO.BBS     BBS sysinfo
  113.         TIMELOG.BBS     BBS usage graph data
  114.         TODAY.BBS       BBS Today's Callers file
  115.         TRASHCAN.CTL    BBS user names/aliases filter
  116.         USERON.BBS      BBS users on all nodes
  117.  
  118. NODEx           Home directory for node X. Contains node specific
  119.                 config files.
  120.         DOOR.SYS        drop file for doors
  121.         DORINFO1.DEF    drop file for doors
  122.         EXITINFO.BBS    drop file for doors
  123. {opt}   FILECFG.DAT     BBS file area configuration file
  124.         IEMSI.LOG       log of IEMSI calls
  125. {opt}   LANGUAGE.DAT    BBS language configuration file
  126. {opt}   MSGCFG.DAT      BBS message area configuration file
  127. {opt}   QUICKCFG.DAT    BBS configuration file
  128.         SYSTEM.LOG      log for this node
  129.         TIMELOG.BBS     usage graph for node
  130.  
  131. LANGUAGE        Each language can have it's own set of directories, as
  132.                 well as a path to its language file.
  133.         DISPLAY         This holds the *.ASC, *.ANS, & *.RIP files
  134.         MENUS           This holds the *.MNU files
  135.         QUESTION        This holds the *.Q-A files
  136.  
  137. MESSAGES        This contains the message base and user files.
  138.         ALIAS.BBS       User aliases
  139.         COMBINED.BBS    User selections for combined read
  140.         LASTREAD.BBS    Extended lastread pointers
  141.         MSGHDR.BBS
  142.         MSGIDX.BBS
  143.         MSGINFO.BBS
  144.         MSGTOIDX.BBS
  145.         MSGTXT.BBS
  146.         USERIDX.BBS     Index to user file
  147.         USERS.BBS       User file
  148.  
  149. NODELIST        This contains the raw nodelist(s), as well as related files.
  150.         NODECOST.CTL    Cost table for QuickBBS netmail charges
  151.         NODEIDX.DAT     QuickBBS index to raw nodelist(s)
  152.         NODEINC.DAT     QuickBBS list of raw nodelist(s)
  153.         NODELIST.182    Raw nodelist
  154.  
  155. NETMAIL         Contains Fido format *.MSG files
  156.  
  157. ==========================================================================
  158.  
  159. Break down of the Structures.
  160.  
  161.   UserRecord = record { USERS.BBS or USERS.DAT }
  162.                  Name        : String[35];
  163.                  City        : String[25];
  164.                  ReservedZero: Byte;
  165.                  Language    : Byte;
  166.                  PwdCrc      : Longint;
  167.                  PwdChangeDate,
  168.                  ExpireDate  : Word;
  169. $IFDEF GOLDBASE}
  170.                  HighMsgRead : LongInt;
  171. {$ELSE}
  172.                  UnusedSpace : LongInt;
  173. {$ENDIF}
  174.                  Attrib2     : Byte;
  175.                  ExtraSpace  : Byte;
  176.                  DataPhone,
  177.                  HomePhone   : String[12];
  178.                  LastTime    : String[5];
  179.                  LastDate    : String[8];
  180.                  Attrib      : Byte;
  181.                  Flags       : FlagType;
  182.                  Credit,
  183.                  Pending,
  184. {$IFDEF GOLDBASE}
  185.                  TimesPosted : Word;
  186.                  ObsoleteField,
  187. {$ELSE}
  188.                  TimesPosted,
  189.                  HighMsgRead,
  190. {$ENDIF}
  191.                  SecLvl,
  192.                  Times,
  193.                  Ups,
  194.                  Downs,
  195.                  UpK,
  196.                  DownK       : Word;
  197.                  TodayK      : Integer;
  198.                  Elapsed,
  199.                  Len         : Integer;
  200.                  CombinedPtr : Word;
  201.                  AliasPtr    : Word;
  202.                  Birthday    : Longint;
  203.                end;
  204.  
  205. (* USERS.BBS or USERS.DAT
  206.  
  207. Field               Description
  208. -----------------------------------------------------------------
  209. Name              : Name of user.
  210. City              : Location of user.
  211. ReservedZero      : Reserved, should always be 0
  212. Language          : Record number of user's current language
  213.